package Controller;

import Util.JDBCUtill;
import javafx.fxml.FXML;
import javafx.scene.control.DatePicker;
import javafx.scene.control.TextField;
import pojo.classroom;

public class ClassroomAddController {

        @FXML
        private TextField Equipment;

        @FXML
        private TextField Capacity;
        @FXML
        private TextField EndTimeFile;
        @FXML
        private TextField StartTimeFile;
        @FXML
        private DatePicker Available;

        @FXML
        private TextField CId;

        @FXML
        void addDateTODB() {
        classroom classroom = new classroom(CId.getText(),Integer.parseInt(Capacity.getText()),
                Equipment.getText(),Available.getValue().toString(),StartTimeFile.getText(),EndTimeFile.getText());
                JDBCUtill.addDate(classroom);
                Main.changeView("ClassRoom.fxml");
        }

}
